import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    Bearer:localStorage.getItem('userInfo')? JSON.parse(localStorage.getItem('userInfo')).token : ''
  },
  mutations: {
    //修改token
    changeLogin(state,user){
      state.Bearer = user;
      localStorage.setItem("userInfo",JSON.stringify(user))
    }
  },
  actions: {
  },
  modules: {
  }
})
